package com.github.springboot.dao;

import com.github.springboot.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by kjtang on 2018/1/17.
 */
public interface UserJpaRepository extends JpaRepository<User,Long> {

    @Query("from User u where u.id=:id")
    User getById(@Param("id") Long id);


//    List<User> getUserList(User user);
}
